export const formatDateYYYYMMDDHHMM = (datetime) => {
  if (!datetime || datetime == 0) {
    return "";
  }
  const date = new Date(parseInt(datetime)); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
  const year = date.getFullYear(),
    month = ("0" + (date.getMonth() + 1)).slice(-2),
    sdate = ("0" + date.getDate()).slice(-2),
    hour = ("0" + date.getHours()).slice(-2),
    minute = ("0" + date.getMinutes()).slice(-2);
  // 拼接
  const result = year + "-" + month + "-" + sdate + " " + hour + ":" + minute;
  // 返回
  return result;
}
